import request from '@/utils/request'

// 查询设备PM列表
export function listPmdata(query) {
  return request({
    url: '/pmdata/pmdata/list',
    method: 'get',
    params: {
      pageNum: query.pageNum,
      pageSize: query.pageSize,
      Equipmentno: query.equipmentno || undefined,
      EquipmentName: query.equipmentName || undefined,
      Modifieddtime: query.modifieddtime || undefined
    }
  })
}

// 查询设备PM详细
export function getPmdata(ID) {
  return request({
    url: '/pmdata/pmdata/' + ID,
    method: 'get'
  })
}

// 新增设备PM
export function addPmdata(data) {
  return request({
    url: '/pmdata/pmdata',
    method: 'post',
    data: data
  })
}

// 修改设备PM
export function updatePmdata(data) {
  return request({
    url: '/pmdata/pmdata',
    method: 'put',
    data: data
  })
}

// 删除设备PM
export function delPmdata(ID) {
  return request({
    url: '/pmdata/pmdata/' + ID,
    method: 'delete'
  })
}
